package com.ruoyi.course.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.course.domain.TVideo;
import com.ruoyi.course.vo.TVideoVo;
import com.ruoyi.course.mapper.TVideoMapper;
import com.ruoyi.course.service.ITVideoService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 视频Service业务层处理
 *
 * @author ruoyi
 * @date 2024-12-07
 */
@Service
public class TVideoServiceImpl extends ServiceImpl<TVideoMapper, TVideo> implements ITVideoService {

    @Override
    public TableDataInfo<TVideoVo> queryList(TVideoVo entity) {
        return PageUtils.buildDataInfo(this.baseMapper.queryList(PageUtils.buildPage(), entity));
    }

    @Override
    public List<TVideoVo> queryAll(TVideoVo entity) {
        return this.baseMapper.queryList(entity);
    }

    @Override
    public TVideoVo queryById(Long id) {
        return this.baseMapper.queryById(id);
    }
}
